package cn.usian.common;

import lombok.Data;

@Data
public class Results<T> {
    private String message;
    private Integer code;
    private T data;


    public static Results build(Object data,Integer code,String message){
        Results<Object> results = new Results<>();
        results.setData(data);
        results.setCode(code);
        results.setMessage(message);
        return results;
    }

    public static Results build(Object data,ResultEnum resultEnum){
        return build(data,resultEnum.getCode(),resultEnum.getMessage());
    }



}
